package com.codefish.example.aop.service;

import com.codefish.example.aop.IHelloService;

/**
 * @author <a href='https://gitee.com/hzf2281'>codefish</a>
 * @version 1.0.0
 * @since 2022/10/13 下午 02:37
 */
public class HelloService implements IHelloService {
    @Override
    public void sayHello() {
        System.out.println("hello");
    }

    @Override
    public void sayHelloWithException() {
        System.out.println("hello BUG!!!");
//        throw new RuntimeException("运行时异常");
        throw new IllegalArgumentException("参数异常");
    }

    @Override
    public void fun() {
        this.sayHello();
    }

    @Override
    public String sayHello(String msg) {
        System.out.println(msg);
        return msg;

    }
}
